Integrand size = 21, antiderivative size = 112 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {3 a b x}{4}-\frac {\left (a^2+b^2\right ) \cos (e+f x)}{f}+\frac {\left (a^2+2 b^2\right ) \cos ^3(e+f x)}{3 f}-\frac {b^2 \cos ^5(e+f x)}{5 f}-\frac {3 a b \cos (e+f x) \sin (e+f x)}{4 f}-\frac {a b \cos (e+f x) \sin ^3(e+f x)}{2 f} \]
3/4*a*b*x-(a^2+b^2)*cos(f*x+e)/f+1/3*(a^2+2*b^2)*cos(f*x+e)^3/f-1/5*b^2*co s(f*x+e)^5/f-3/4*a*b*cos(f*x+e)*sin(f*x+e)/f-1/2*a*b*cos(f*x+e)*sin(f*x+e) ^3/f
Time = 0.34 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.81 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {-30 \left (6 a^2+5 b^2\right ) \cos (e+f x)+5 \left (4 a^2+5 b^2\right ) \cos (3 (e+f x))-3 b (b \cos (5 (e+f x))-5 a (12 (e+f x)-8 \sin (2 (e+f x))+\sin (4 (e+f x))))}{240 f} \]
(-30*(6*a^2 + 5*b^2)*Cos[e + f*x] + 5*(4*a^2 + 5*b^2)*Cos[3*(e + f*x)] - 3 *b*(b*Cos[5*(e + f*x)] - 5*a*(12*(e + f*x) - 8*Sin[2*(e + f*x)] + Sin[4*(e + f*x)])))/(240*f)
Time = 0.47 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.476, Rules used = {3042, 3268, 3042, 3115, 3042, 3115, 24, 3492, 290, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sin ^3(e+f x) (a+b \sin (e+f x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (e+f x)^3 (a+b \sin (e+f x))^2dx\) |
\(\Big \downarrow \) 3268 |
\(\displaystyle \int \sin ^3(e+f x) \left (a^2+b^2 \sin ^2(e+f x)\right )dx+2 a b \int \sin ^4(e+f x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (e+f x)^3 \left (a^2+b^2 \sin (e+f x)^2\right )dx+2 a b \int \sin (e+f x)^4dx\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \int \sin (e+f x)^3 \left (a^2+b^2 \sin (e+f x)^2\right )dx+2 a b \left (\frac {3}{4} \int \sin ^2(e+f x)dx-\frac {\sin ^3(e+f x) \cos (e+f x)}{4 f}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (e+f x)^3 \left (a^2+b^2 \sin (e+f x)^2\right )dx+2 a b \left (\frac {3}{4} \int \sin (e+f x)^2dx-\frac {\sin ^3(e+f x) \cos (e+f x)}{4 f}\right )\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \int \sin (e+f x)^3 \left (a^2+b^2 \sin (e+f x)^2\right )dx+2 a b \left (\frac {3}{4} \left (\frac {\int 1dx}{2}-\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )-\frac {\sin ^3(e+f x) \cos (e+f x)}{4 f}\right )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \int \sin (e+f x)^3 \left (a^2+b^2 \sin (e+f x)^2\right )dx+2 a b \left (\frac {3}{4} \left (\frac {x}{2}-\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )-\frac {\sin ^3(e+f x) \cos (e+f x)}{4 f}\right )\) |
\(\Big \downarrow \) 3492 |
\(\displaystyle 2 a b \left (\frac {3}{4} \left (\frac {x}{2}-\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )-\frac {\sin ^3(e+f x) \cos (e+f x)}{4 f}\right )-\frac {\int \left (1-\cos ^2(e+f x)\right ) \left (a^2+b^2-b^2 \cos ^2(e+f x)\right )d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 290 |
\(\displaystyle 2 a b \left (\frac {3}{4} \left (\frac {x}{2}-\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )-\frac {\sin ^3(e+f x) \cos (e+f x)}{4 f}\right )-\frac {\int \left (b^2 \cos ^4(e+f x)-\left (a^2+2 b^2\right ) \cos ^2(e+f x)+a^2 \left (\frac {b^2}{a^2}+1\right )\right )d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle 2 a b \left (\frac {3}{4} \left (\frac {x}{2}-\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )-\frac {\sin ^3(e+f x) \cos (e+f x)}{4 f}\right )-\frac {-\frac {1}{3} \left (a^2+2 b^2\right ) \cos ^3(e+f x)+\left (a^2+b^2\right ) \cos (e+f x)+\frac {1}{5} b^2 \cos ^5(e+f x)}{f}\) |
-(((a^2 + b^2)*Cos[e + f*x] - ((a^2 + 2*b^2)*Cos[e + f*x]^3)/3 + (b^2*Cos[ e + f*x]^5)/5)/f) + 2*a*b*(-1/4*(Cos[e + f*x]*Sin[e + f*x]^3)/f + (3*(x/2 - (Cos[e + f*x]*Sin[e + f*x])/(2*f)))/4)
3.2.57.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_Symbol] :> I nt[ExpandIntegrand[(a + b*x^2)^p*(c + d*x^2)^q, x], x] /; FreeQ[{a, b, c, d }, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && IGtQ[q, 0]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)])^2, x_Symbol] :> Simp[2*c*(d/b) Int[(b*Sin[e + f*x])^(m + 1), x], x] + Int[(b*Sin[e + f*x])^m*(c^2 + d^2*Sin[e + f*x]^2), x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[-f^(-1) Subst[Int[(1 - x^2)^((m - 1)/2)*(A + C - C*x^2 ), x], x, Cos[e + f*x]], x] /; FreeQ[{e, f, A, C}, x] && IGtQ[(m + 1)/2, 0]
Time = 1.92 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.85
method | result | size |
derivativedivides | \(\frac {-\frac {a^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a b \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {b^{2} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}}{f}\) | \(95\) |
default | \(\frac {-\frac {a^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a b \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {b^{2} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}}{f}\) | \(95\) |
parts | \(-\frac {a^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3 f}-\frac {b^{2} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5 f}+\frac {2 a b \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f}\) | \(100\) |
parallelrisch | \(\frac {180 a b x f -3 b^{2} \cos \left (5 f x +5 e \right )+15 a b \sin \left (4 f x +4 e \right )+20 \cos \left (3 f x +3 e \right ) a^{2}+25 \cos \left (3 f x +3 e \right ) b^{2}-120 a b \sin \left (2 f x +2 e \right )-180 \cos \left (f x +e \right ) a^{2}-150 \cos \left (f x +e \right ) b^{2}-160 a^{2}-128 b^{2}}{240 f}\) | \(113\) |
risch | \(\frac {3 a b x}{4}-\frac {3 a^{2} \cos \left (f x +e \right )}{4 f}-\frac {5 b^{2} \cos \left (f x +e \right )}{8 f}-\frac {b^{2} \cos \left (5 f x +5 e \right )}{80 f}+\frac {a b \sin \left (4 f x +4 e \right )}{16 f}+\frac {\cos \left (3 f x +3 e \right ) a^{2}}{12 f}+\frac {5 \cos \left (3 f x +3 e \right ) b^{2}}{48 f}-\frac {a b \sin \left (2 f x +2 e \right )}{2 f}\) | \(118\) |
norman | \(\frac {-\frac {20 a^{2}+16 b^{2}}{15 f}+\frac {3 a b x}{4}-\frac {4 a^{2} \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {2 \left (14 a^{2}+16 b^{2}\right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f}-\frac {\left (20 a^{2}+16 b^{2}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f}-\frac {3 a b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 f}-\frac {7 a b \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {7 a b \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {3 a b \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}+\frac {15 a b x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {15 a b x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {15 a b x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {15 a b x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {3 a b x \left (\tan ^{10}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{5}}\) | \(262\) |
1/f*(-1/3*a^2*(2+sin(f*x+e)^2)*cos(f*x+e)+2*a*b*(-1/4*(sin(f*x+e)^3+3/2*si n(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-1/5*b^2*(8/3+sin(f*x+e)^4+4/3*sin(f*x+ e)^2)*cos(f*x+e))
Time = 0.28 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.80 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=-\frac {12 \, b^{2} \cos \left (f x + e\right )^{5} - 45 \, a b f x - 20 \, {\left (a^{2} + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{3} + 60 \, {\left (a^{2} + b^{2}\right )} \cos \left (f x + e\right ) - 15 \, {\left (2 \, a b \cos \left (f x + e\right )^{3} - 5 \, a b \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{60 \, f} \]
-1/60*(12*b^2*cos(f*x + e)^5 - 45*a*b*f*x - 20*(a^2 + 2*b^2)*cos(f*x + e)^ 3 + 60*(a^2 + b^2)*cos(f*x + e) - 15*(2*a*b*cos(f*x + e)^3 - 5*a*b*cos(f*x + e))*sin(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 221 vs. \(2 (104) = 208\).
Time = 0.24 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.97 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=\begin {cases} - \frac {a^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {2 a^{2} \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {3 a b x \sin ^{4}{\left (e + f x \right )}}{4} + \frac {3 a b x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{2} + \frac {3 a b x \cos ^{4}{\left (e + f x \right )}}{4} - \frac {5 a b \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{4 f} - \frac {3 a b \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{4 f} - \frac {b^{2} \sin ^{4}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {4 b^{2} \sin ^{2}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {8 b^{2} \cos ^{5}{\left (e + f x \right )}}{15 f} & \text {for}\: f \neq 0 \\x \left (a + b \sin {\left (e \right )}\right )^{2} \sin ^{3}{\left (e \right )} & \text {otherwise} \end {cases} \]
Piecewise((-a**2*sin(e + f*x)**2*cos(e + f*x)/f - 2*a**2*cos(e + f*x)**3/( 3*f) + 3*a*b*x*sin(e + f*x)**4/4 + 3*a*b*x*sin(e + f*x)**2*cos(e + f*x)**2 /2 + 3*a*b*x*cos(e + f*x)**4/4 - 5*a*b*sin(e + f*x)**3*cos(e + f*x)/(4*f) - 3*a*b*sin(e + f*x)*cos(e + f*x)**3/(4*f) - b**2*sin(e + f*x)**4*cos(e + f*x)/f - 4*b**2*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) - 8*b**2*cos(e + f*x )**5/(15*f), Ne(f, 0)), (x*(a + b*sin(e))**2*sin(e)**3, True))
Time = 0.19 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.84 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {80 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{2} + 15 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a b - 16 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} b^{2}}{240 \, f} \]
1/240*(80*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^2 + 15*(12*f*x + 12*e + sin( 4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a*b - 16*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*b^2)/f
Time = 0.29 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.91 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {3}{4} \, a b x - \frac {b^{2} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac {a b \sin \left (4 \, f x + 4 \, e\right )}{16 \, f} - \frac {a b \sin \left (2 \, f x + 2 \, e\right )}{2 \, f} + \frac {{\left (4 \, a^{2} + 5 \, b^{2}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac {{\left (6 \, a^{2} + 5 \, b^{2}\right )} \cos \left (f x + e\right )}{8 \, f} \]
3/4*a*b*x - 1/80*b^2*cos(5*f*x + 5*e)/f + 1/16*a*b*sin(4*f*x + 4*e)/f - 1/ 2*a*b*sin(2*f*x + 2*e)/f + 1/48*(4*a^2 + 5*b^2)*cos(3*f*x + 3*e)/f - 1/8*( 6*a^2 + 5*b^2)*cos(f*x + e)/f
Time = 10.06 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.40 \[ \int \sin ^3(e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {3\,a\,b\,x}{4}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {20\,a^2}{3}+\frac {16\,b^2}{3}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {28\,a^2}{3}+\frac {32\,b^2}{3}\right )+4\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+\frac {4\,a^2}{3}+\frac {16\,b^2}{15}+7\,a\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3-7\,a\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7-\frac {3\,a\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9}{2}+\frac {3\,a\,b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{2}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^5} \]
(3*a*b*x)/4 - (tan(e/2 + (f*x)/2)^2*((20*a^2)/3 + (16*b^2)/3) + tan(e/2 + (f*x)/2)^4*((28*a^2)/3 + (32*b^2)/3) + 4*a^2*tan(e/2 + (f*x)/2)^6 + (4*a^2 )/3 + (16*b^2)/15 + 7*a*b*tan(e/2 + (f*x)/2)^3 - 7*a*b*tan(e/2 + (f*x)/2)^ 7 - (3*a*b*tan(e/2 + (f*x)/2)^9)/2 + (3*a*b*tan(e/2 + (f*x)/2))/2)/(f*(tan (e/2 + (f*x)/2)^2 + 1)^5)